<template>
  <div class="big">
    <div class="top">
      <p class="pic">
        <van-image round width="5rem" height="5rem" />
      </p>
      <p @click="login()" class="text">{{ text }}</p>
    </div>

    <div class="mi">
      <div>
        <p>0张</p>
        <p style="color: #797d82; font-size: 13px">卖座券</p>
      </div>
      <div>
        <p>￥0</p>
        <p style="color: #797d82; font-size: 13px">余额</p>
      </div>
    </div>

    <div class="bo">
      <p>
        <span><van-icon name="coupon-o" size="20" color="yellow" /></span>
        电影订单
      </p>
      <p>
        <span><van-icon name="bill-o" size="20" color="red" /></span> 组合红包
      </p>
      <p>
        <span><van-icon name="friends-o" size="20" color="blue" /></span>
        帮助与客服
      </p>
      <p>
        <span><van-icon name="discount" size="20" color="green" /></span> 设置
      </p>
    </div>
  </div>
</template>

<script>
import Vue from 'vue';
import {getCookie} from '@/util/cookie'
import { Image as VanImage ,Icon} from "vant";

Vue.use(Icon);
Vue.use(VanImage);
export default {
  created(){
    let username = getCookie("username");
    if(username){
      this.text = username;
    }else{
      this.text = '立即登录'
    }
  },
  data() {
    return {
      text:''
    };
  },
  methods: {
    login() {
      this.$router.push("/login");
    },
  },
};
</script>

<style lang="scss" scoped>
.big {
  background-color: #eee;
  padding-bottom: 80px;
}
.top {
  background-color: #ff7100;
  height: 200px;
  display: flex;
  padding: 50px 30px;

  .text {
    color: #fff;
    font-size: 16px;
    margin-left: 30px;
    margin-top: 30px;
  }
}
.mi {
  display: flex;
  justify-content: space-between;
  text-align: center;
  margin: 0 0 10px;
  padding: 20px 30px;
  background-color: #fff;
  div {
    width: 50%;
    margin: auto;
  }
}
.bo {
  background-color: #fff;
  padding: 10px 15px;
  p {
    color: #191a1b;
    font-size: 15px;
    height: 45px;
    line-height: 45px;
    margin-left: 10px;
  }
}
</style>
